#include "VStdAfx.h"
#include "VAnimation.h"

VAnimationable::~VAnimationable()
{

}

void VAnimationable::UpdateAnimationControllers(float DeltaTime)
{

}

void VAnimationable::RemoveAnimationController(VAnimationController* AnimController)
{
	if (AnimController && m_AnimationControllers)
	{
		if (m_AnimationControllers == AnimController)
		{
			// remove at head of list
			VAnimationControllerPtr Save = AnimController;
			m_AnimationControllers = AnimController->NextController();
			AnimController->m_NextController = NULL;
		}
		else
		{
			// Search for control object.
			VAnimationController* Prev = m_AnimationControllers;
			VAnimationController* Curr = Prev->NextController();
			while (Curr && Curr != AnimController)
			{
				Prev = Curr;
				Curr = Curr->NextController();
			}
			if (Curr)
			{
				// Found the control; remove it.
				VAnimationControllerPtr Save = AnimController;
				Prev->m_NextController = AnimController->m_NextController;
				AnimController->m_NextController = NULL;
			}
		}
	}
}

void VAnimationable::RemoveAllAnimationControllers()
{
	m_AnimationControllers = NULL;
}


VAnimation::VAnimation(void)
{
}


VAnimation::~VAnimation(void)
{
}

